<div class="depot-form">
  <%= error_messages_for 'community' %>
  <fieldset>
    <legend>Enter County Details</legend>
    <% form_for @community do |form| %>
      <p>
        <label for="name" >Community Name:</label>
        <%= form.text_field :name, :size => 40 %>
      </p>
      <p>
        <label for="code" >Community Code:</label>
        <%= form.text_field :code, :size => 40 %>
      </p>
      <p>
        <label for="county" >County:</label>
        <%=
        @counties = County.find(:all).map { |c| [c.name, c.id]}
        form.select(:county_id, @counties )
      %>
      </p>
      <%= submit_tag "Update Community" , :class => "submit" %>
    <% end %>
  </fieldset>
  <%= link_to 'Back', :action => "index" %>
</div>